<%@ Language=VBScript EnableSessionState="False" %>
<%
	ProgressID_ = Request("id")
	
	Dim oFileUpProgress
	Dim intProgressID
	Dim intPercentComplete
	Dim intBytesTransferred
	Dim intTotalBytes
	Dim bDone
	
	intPercentComplete = 0
	intBytesTransferred = 0
	intTotalBytes = 0
	
	Set oFileUpProgress = Server.CreateObject("Softartisans.FileUpProgress")
	
	oFileUpProgress.ProgressID = CInt( ProgressID_ )
	
	intPercentComplete = oFileUpProgress.Percentage
	intBytesTransferred = oFileUpProgress.TransferredBytes
	intTotalBytes = oFileUpProgress.TotalBytes
	
	intPercentComplete = replace( cStr(intPercentComplete), ",", "." )
	
	Response.Clear()
	Response.ContentType = "application/json"
	'Response.Charset = "ISO-8859-1"
	Response.Expires = 0
	Response.ExpiresAbsolute = Now() - 1
	Response.AddHeader "pragma","no-cache"
	Response.AddHeader "cache-control","private"
	Response.CacheControl = "no-cache"
%>{"porcentagem":"<% = intPercentComplete %>","transferido":"<% = intBytesTransferred %>","total":"<% = intTotalBytes %>"}